﻿@model IEnumerable<Mvc4TwitterBootstrap.Models.PersonModel>

@{
    ViewBag.Title = "List";
}

<div class="span12">
	<h2>List</h2>
	<hr/>
	<div class="well">Kurzer Beschreibungstext für das aktuelle Formular - Listenansicht eines Objektes</div>
</div>

<div class="span12">
<table class="table table-striped">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Vorname)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Nachname)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Ort)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Vorname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Nachname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Ort)
        </td>
        <td>
            @* http://stackoverflow.com/questions/2520487/how-to-use-html-5-data-attributes-in-asp-net-mvc *@
            @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }, new { @class = "btn btn-mini"}) |
            @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }, new {@class="btn btn-mini"}) |
            @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }, new {@class="btn btn-mini"})
        </td>
    </tr>
}

</table>
</div>

<div class="span12">
	<div class="well">
		@Html.ActionLink("Create New", "Create", null, new {@class="btn btn-small", data_icon="icon-plus"})
	</div>
</div>

